var buffer1 = Buffer.from('runoob');
// 剪切缓冲区
var buffer2 = buffer1.slice(1,3);

console.log("buffer2 content: " + buffer2.toString());

//差不多于
var buf3 = Buffer.alloc(2)
buffer1.copy(buf3,0,1,3)
console.log(buf3.toString());


console.log('更多：https://www.runoob.com/nodejs/nodejs-buffer.html');